package ua.edu.sumdu.j2se.roman.lab1.util;

import java.awt.*;
import java.io.Closeable;
import java.io.IOException;

/**
 * Author: Radko Roman.
 */

/**
 * Contains utils methods.
 *
 */
public class Utils {
    /**
     * Provide sound notification.
     *
     */
    public static void beep() {
        Toolkit.getDefaultToolkit().beep();
    }

    /**
     * Responsible for correct closing.
     *
     * @param s some object
     */
    public static void closeQuietly(Closeable s) {
        if ( s != null ) {
            try { s.close(); } catch (IOException e) { }
        }
    }

}
